#ifndef _MATRIX_TEMPLATE_H_
#define _MATRIX_TEMPLATE_H_

#include "cuVector.h"

#if (!defined(__VECTOR_TYPES_H__))

    template <class T> 
    struct Matrix4x4
    {
        Vector4D<T> row[4];
    };

    template <class T> 
    struct Matrix3x3
    {
	    Vector3D<T> row[3];
    };

    template <class T> 
    struct Matrix2x2
    {
	    Vector2D<T> row[2];
    };

    typedef Matrix4x4<float> matrix4x4;
    typedef Matrix3x3<float> matrix3x3;
    typedef Matrix2x2<float> matrix2x2;

#else // if not compiled with __CUDACC__

    struct Matrix4x4f
    {
        float4 row[4];
    };

    struct Matrix3x3f
    {
        float3 row[3];
    };

    struct Matrix2x2f
    {
        float2 row[2];
    };

    typedef Matrix4x4f matrix4x4;
    typedef Matrix3x3f matrix3x3;
    typedef Matrix2x2f matrix2x2;

#endif

#include "cuMatrix_op.h"

#endif // _MATRIX_TEMPLATE_H_